package com.zengqingfa.basic;

/**
 * @author zengqingfa
 * @className Test
 * @description
 * @create 2021/11/11 21:41
 */
public class Test {

    public static void main(String[] args) {
        String s = "1小时40分钟";
         s = s.replace("小时", "-").replace("分钟","-");
        String[] split = s.split("-");
        //转换成秒
        int i = Integer.valueOf(split[0]) * 60 * 60;
        int j = Integer.valueOf(split[1]) * 60;
        System.out.println((i+j)+"秒");
    }
}